package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;


@EnumDescription("收藏类型")
public enum CollectLableTypeEnum implements DictEnum {

    //--------------------start-----------------

    //------------------问诊---------------------------
    PHYSICIAN_VISITS("01","问诊"),
    TOPIC("02","话题"),
    THE_ARTICLE("03","文章"),


    //------------------搜搜---------------------------
    HOS("04", "医院"),

    DOCTER("05", "医生"),

    ART("06", "文章"),

    PENSION_INFO("07", "养老"),

    PSYCHOLOGICAL_COUNSELING("08", "心理咨询"),
    //--------------------end-------------------
    ;

    private String key;

    private String value;

    CollectLableTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    @Override
    public String getKey() {
        return this.key;
    }

    @Override
    public String getValue() {
        return this.value;
    }

    /**
     * 序列化使用
     */
    public static class Covert extends StdConverter<String, JSONObject> {
        @Override
        public JSONObject convert(String value) {
            return DictEnum.valueOfJson(CollectLableTypeEnum.class, value);
        }
    }
}
